package com.ds.common.kafka.producer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.core.KafkaTemplate;


/**
 * @class: RocketMqConfig
 * @description:
 * @author: fs
 * @create: 2024/1/18 15:19
 **/
@Configuration
public class MqProducer {


    @Autowired
    private KafkaTemplate<String, Object> kafkaTemplate;

    public void sendMsg(String topic, Object body) {
        kafkaTemplate.send(topic, body);
    }


}
